import request from "@/utils/request";
import type { AttrListType, AttrType } from "@/types/attr";

// 请求平台属性列表
export const reqAttrList = (category1Id: number, category2Id: number, category3Id: number) => {
    return request.get<null, AttrType>(`/admin/product/attrInfoList/${category1Id}/${category2Id}/${category3Id}`);
};
// 删除平台属性
export const reqDeleteAttr = (attrId: number) => {
    return request.delete(`/admin/product/deleteAttr/${attrId}`);
};
// 添加或修改平台属性
export const reqAddOrUpdateAttr = (attrInfo: AttrListType) => {
    return request.post("/admin/product/saveAttrInfo", attrInfo);
};
